/***************************************************************************\
 * The Mattise Kernel														*
 * Copyright 2007 Matthew Iselin											*
 * Licensed under the GPL													*
 *																			*
 * thread.c																	*
 *																			*
 * Thread tasks																*
 *																			*
\***************************************************************************/

// Includes
#include "process.h"

// Functions

// creates a thread
int createthread( int entry, int stack, const char* tname, unsigned int prio )
{
	// call it
	unsigned int ebx;
	__asm__ __volatile__ ( "int $0x80" : "=b" (ebx) : "a" (3), "b" (stack), "c" (prio), "S" (entry), "D" ((unsigned int) tname) );
	return ebx;
}
